class ModifyGridEventsMechanism < ActiveRecord::Migration
  def self.up
    drop_table :grid_events_users
    add_column :grid_events, :version, :integer
    add_column :grids, :version, :integer, :null => false
    remove_column :users, :is_logged_in
  end

  def self.down
    create_table :grid_events_users, :id => false do |t|
      t.integer :grid_event_id
      t.integer :user_id
    end
    remove_column :grid_events, :version
    remove_column :grids, :version
    add_column :users, :is_logged_in, :boolean, :null => false
  end
end
